<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="js/react.js"></script>
    <script src="js/react-dom.js"></script>
    <script src="js/browser.min.js"></script>
    <script></script>
</head>
<body>
    <div id='example'></div>

    <script type="text/babel">
        var TestComponent = React.createClass({
            handleChange:function(event){
             console.log(
                '触发了onChange事件',event.target.value
                );
            },
            render:function(){
                return <div>
                <input type='text' 
                defaultValue="123"
                placeholder="plz input sth"/>
                
                <input type='text' 
                onChange={this.handleChange}
                value='hello'/>
                </div>
            }
        });

        ReactDOM.render(
            <TestComponent></TestComponent>,
            document.getElementById('example')
        );
    </script>
</body>
</html>